<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>预约</title>
    <link rel="stylesheet" href="../css/page-health-order.css"/>

    <script>
        // var phoneNumber = "13212345678";
    </script>
</head>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div class="app" id="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">传智健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="list-column1">
            <ul class="list">
                <li class="list-item" v-for="setmeal in setmealList">
                    <a class="link-page" :href="'healthScheme.html?orderDate='+setmeal.orderDate">
                        <!--<img class="img-object f-left" :src="'http://pqjroc654.bkt.clouddn.com/'+setmeal.img" alt="">-->
                        <img class="img-object f-left" :src="'http://qiuo4nrcv.hn-bkt.clouddn.com/'+setmeal.img" alt="">
                        <div class="item-body">
                            <h4 class="ellipsis item-title">{{setmeal.name}}</h4>
                            <p class="ellipsis-more item-desc">{{setmeal.remark}}</p>
                            <p class="item-keywords">
                                <span>{{setmeal.sex == '0' ? '性别不限' : setmeal.sex == '1' ? '男':'女'}}</span>
                                <span>{{setmeal.age}}</span>
                            </p>
                            <h4>到诊日期:{{setmeal.orderDate}}</h4>
                            <h4>到诊状态:{{setmeal.orderStatus}}</h4>

                        </div>
                    </a>
                </li>
            </ul>
            <div>
                <el-col :span="12">
                    <el-form-item label="起始时间">
                        <el-date-picker
                                v-model="date.startTime"
                                type="date"
                                placeholder="选择日期">
                        </el-date-picker>
                    </el-form-item>
                    <el-col :span="12">
                        <el-form-item label="结束时间">
                            <el-date-picker
                                    v-model="date.endTime"
                                    type="date"
                                    placeholder="选择日期">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                </el-col>

            </div>

        </div>
    </div>
</div>
<!-- 页面 css js -->
<!--<script src="../js/vue.js"></script>-->
<script src="../plugins/vue/vue.js"></script>
<script src="../plugins/vue/axios-0.18.0.js"></script>
<script src="../plugins/elementui/index.js"></script>
<!--<script src="../js/page-health-order.js"></script>-->
<script>
    var vue = new Vue({
        el: '#app',
        data: {
            setmealList: [],
            memberList:{},
            date:{}
        },
        mounted() {

            axios.post("/member/checkLogin.do?").then((res) => {
                if (res.data.flag) {
                    // this.$message.success(res.data.message)
                    this.memberList = res.data.data;

                    axios.post("/setmeal/getAllSetmealByphoneNumber.do?phoneNumber="+this.memberList.phoneNumber).then((res) => {
                        if (res.data.flag) {
                            // this.$message.success(res.data.message)
                            this.setmealList = res.data.data;
                        } else {
                            this.$message.error(res.data.message)
                        }
                    });


                    //     axios.post("/setmeal/getAllSetmealByphoneNumber.do?phoneNumber="+this.memberList.phoneNumber).then((res) => {
                    //         if (res.data.flag) {
                    //         // this.$message.success(res.data.message)
                    //         this.setmealList = res.data.data;
                    //     } else {
                    //         this.$message.error(res.data.message)
                    //     }
                    // });


                } else {
                    this.$message.error(res.data.message);
                    //未登录或登录状态失效
                    location.href="/pages/login.html"
                }
            });


        }
    });
</script>
</body>